package day0428.homework.factor.EasyFactory;/*
 * @创建者：黄苟苟
 * @创建时间：2021/4/28   23:17
 * @Description描述
 **/

public class FoodFactor {
    public Food createFood(String name){
        if ("orange".equals(name)){
            return new Orange();
        }else if("apple".equals(name)){
            return new Apple();
        }
        return null;
    }
    }

